#ifndef SDR_ANIMATION_H_INCLUDED
#define SDR_ANIMATION_H_INCLUDED

#include "SDR_Surface.h"
#include "SDR_Button.h"


#define SDR_AnimationDefault_time 1000
#define SDR_AnimationDefault_resolution 25
#define SDR_AnimationDefault_begin 0
#define SDR_AnimationDefault_end 255


enum SDR_AnimationStatus
{
    SDR_ANIMATION_STOP, SDR_ANIMATION_START, SDR_ANIMATION_RESET
};
typedef enum SDR_AnimationStatus SDR_AnimationStatus;

struct SDR_Animation
{
    void * element;
    SDR_SurfaceType surfaceType;
    void * animationFunction;

    uint16_t time;
    uint16_t resolution;

    uint32_t beginTime;
    uint16_t frame;

    SDR_AnimationStatus status;

    int16_t begin;
    int16_t end;

    void * otherParameter;

    struct SDR_Animation * nextAnimation;
};
typedef struct SDR_Animation SDR_Animation;


#endif // SDR_ANIMATION_H_INCLUDED
